home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
guis für programme
/
xanim guis
/
xanim
/
xanimamigabeta7
/
xanim_cybergfx.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-07
|
1KB
|
56 lines
#include <graphics/gfxbase.h>
#include <graphics/displayinfo.h>
#include <cybergraphics/cybergraphics.h>
#include <proto/cybergraphics.h>
#include <intuition/intuition.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
struct TagItem CModeTags[]=
{
CYBRMREQ_Screen,0,
CYBRMREQ_MinDepth,8,
CYBRMREQ_MaxDepth,24,
CYBRMREQ_WinTitle,"Select CyBERgraphics ScreenMode",
CYBRMREQ_OKText,"OK",
CYBRMREQ_CancelText,"Cancel",
CYBRMREQ_MinWidth,160,
CYBRMREQ_MinHeight,120,
TAG_DONE
};
struct Library *CyberGfxBase;
struct Screen *CyberScr;
ULONG CyberDepth;
OpenCyber()
{
ULONG ModeID;
if(!(CyberGfxBase=OpenLibrary((UBYTE *)"cybergraphics.library", 40L))) {CloseCyber();exit(20);}
ModeID=CModeRequestTagList(0L,CModeTags);
if(ModeID==0) {CloseCyber();exit(20);}
CyberDepth=GetCyberIDAttr(CYBRIDATTR_DEPTH,ModeID);
CyberScr=(struct Screen *)OpenScreenTags(0L,
SA_DisplayID,ModeID,
SA_ShowTitle,0,
SA_Title,0,
SA_Quiet,1,
SA_AutoScroll,1,
SA_Overscan,1,
SA_Depth,CyberDepth,
TAG_DONE);
if(!CyberScr) {CloseCyber();exit(20);}
}
CloseCyber()
{
if(CyberScr) CloseScreen(CyberScr);
if(CyberGfxBase) CloseLibrary(CyberGfxBase);
}